Customize Toolbar DXL?

Hi All

Has anyone stumbled across dxl commands/constants for (re)setting the project (favorites, location, project) and module (baseline, clipboard, column etc) toolbar settings?

thanks
Sara
smarti.sj - Mon Dec 13 15:14:04 EST 2010

Re: Customize Toolbar DXL?
Mathias Mamsch - Thu Jan 06 18:08:29 EST 2011

Hey Sara,

the favorites settings is just a user config area file, called "favorites.txt", so you can delete this file from the user config area to reset the favorites. The default value for the dialogs can be controlled over the DialogDefaults perms:
 

bool saveDefaults (DialogDefaults)
void set (DialogDefaults, string itemName, bool value)
void set (DialogDefaults, string itemName, real value)
string get (DialogDefaults, string itemName, string defaultValue)
real get (DialogDefaults, string itemName, real defaultValue)
void resetDefaults (DialogDefaults)
bool get (DialogDefaults, string itemName, bool defaultValue)
int get (DialogDefaults, string itemName, int defaultValue)
void set (DialogDefaults, string itemName, string value)
void set (DialogDefaults, string itemName, int value)
void ::do (string&, DialogDefaults, void)
DialogDefaults loadDefaults (string)

 


The current Project is also saved in the config area, I am not sure if there are perms for it, but you can just delete this file too (settings.txt) in the "DOORS+AF8-database+AF8-explorer" directory in the user config area.

But I am not sure that was what you are asking? Or did you want to manipulate the symbol bars directly? Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: Customize Toolbar DXL?
smarti.sj - Fri Jan 07 08:14:03 EST 2011

Mathias Mamsch - Thu Jan 06 18:08:29 EST 2011

Hey Sara,

the favorites settings is just a user config area file, called "favorites.txt", so you can delete this file from the user config area to reset the favorites. The default value for the dialogs can be controlled over the DialogDefaults perms:
 

bool saveDefaults (DialogDefaults)
void set (DialogDefaults, string itemName, bool value)
void set (DialogDefaults, string itemName, real value)
string get (DialogDefaults, string itemName, string defaultValue)
real get (DialogDefaults, string itemName, real defaultValue)
void resetDefaults (DialogDefaults)
bool get (DialogDefaults, string itemName, bool defaultValue)
int get (DialogDefaults, string itemName, int defaultValue)
void set (DialogDefaults, string itemName, string value)
void set (DialogDefaults, string itemName, int value)
void ::do (string&, DialogDefaults, void)
DialogDefaults loadDefaults (string)

 


The current Project is also saved in the config area, I am not sure if there are perms for it, but you can just delete this file too (settings.txt) in the "DOORS+AF8-database+AF8-explorer" directory in the user config area.

But I am not sure that was what you are asking? Or did you want to manipulate the symbol bars directly? Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Hey Mathias,

I need to explain more I guess ... I have a corporate DOORS class given at multiple sites. We are upgrading it to 9+ from 8.2. We refresh the database by script after each class restoring the student passwords to the default, restoring display colors to the default etc. With newer menu View > Customize Tool bar options (on both project and module menus) - we need to refresh the menu items to be consistent with the class materials. - I can't give the trainers access to the server to delete the files. I think what I may have to start doing is delete/restore student users by script rather than try to reset student user settings.

thanks
Sara

Re: Customize Toolbar DXL?
Mathias Mamsch - Fri Jan 07 08:31:00 EST 2011

smarti.sj - Fri Jan 07 08:14:03 EST 2011
Hey Mathias,

I need to explain more I guess ... I have a corporate DOORS class given at multiple sites. We are upgrading it to 9+ from 8.2. We refresh the database by script after each class restoring the student passwords to the default, restoring display colors to the default etc. With newer menu View > Customize Tool bar options (on both project and module menus) - we need to refresh the menu items to be consistent with the class materials. - I can't give the trainers access to the server to delete the files. I think what I may have to start doing is delete/restore student users by script rather than try to reset student user settings.

thanks
Sara

Ah ok, i guess in this case what you need is:
 

// run this with any current module open
   setModuleToolbarDefaults (current, true) 
   setDatabaseToolbarDefaults(dbExplorer,true)

 


You might need to run this once for every training user in a batch.

Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: Customize Toolbar DXL?
smarti.sj - Fri Jan 07 10:44:53 EST 2011

Mathias Mamsch - Fri Jan 07 08:31:00 EST 2011

Ah ok, i guess in this case what you need is:
 

// run this with any current module open
   setModuleToolbarDefaults (current, true) 
   setDatabaseToolbarDefaults(dbExplorer,true)

 


You might need to run this once for every training user in a batch.

Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

thanks!

Re: Customize Toolbar DXL?
smarti.sj - Fri Jan 07 11:11:43 EST 2011

Mathias Mamsch - Fri Jan 07 08:31:00 EST 2011

Ah ok, i guess in this case what you need is:
 

// run this with any current module open
   setModuleToolbarDefaults (current, true) 
   setDatabaseToolbarDefaults(dbExplorer,true)

 


You might need to run this once for every training user in a batch.

Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Mathias - do you know of any constants available for individual toolbar options if I want to go beyond the defaults?

thanks!

Re: Customize Toolbar DXL?
Mathias Mamsch - Sat Jan 08 13:01:42 EST 2011

smarti.sj - Fri Jan 07 11:11:43 EST 2011
Mathias - do you know of any constants available for individual toolbar options if I want to go beyond the defaults?

thanks!

These perms should help you with this. I think they are pretty selfexplanatory ...
 

void toolBarShow (Module module, string Name, bool bShow)
void toolBarShow (DB box, string Name, bool bShow)
 
string toolBarGetBandNameForIndex (Module module, int index)
string toolBarGetBandNameForIndex (DB box, int index)
 
int toolBarGetBandCount (DB box)
int toolBarGetBandCount (Module module)

 


Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: Customize Toolbar DXL?
EHcnck - Wed Oct 11 15:06:43 EDT 2017

Mathias Mamsch - Sat Jan 08 13:01:42 EST 2011

These perms should help you with this. I think they are pretty selfexplanatory ...
 

void toolBarShow (Module module, string Name, bool bShow)
void toolBarShow (DB box, string Name, bool bShow)
 
string toolBarGetBandNameForIndex (Module module, int index)
string toolBarGetBandNameForIndex (DB box, int index)
 
int toolBarGetBandCount (DB box)
int toolBarGetBandCount (Module module)

 


Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Is there any DXL API for setting the below settings?

 

https://www-304.ibm.com/support/entdocview.wss?uid=swg1PI37067

1. Open Tools > Options > Settings
2. Disable the following options.
- Open last displayed folder or project on startup
- Prompt to open all modules from last session on startup
- Remember size, position and splitter width for Database Explorer window

 

Re: Customize Toolbar DXL?
Mathias Mamsch - Thu Oct 12 04:22:16 EDT 2017

EHcnck - Wed Oct 11 15:06:43 EDT 2017

Is there any DXL API for setting the below settings?

 

https://www-304.ibm.com/support/entdocview.wss?uid=swg1PI37067

1. Open Tools > Options > Settings
2. Disable the following options.
- Open last displayed folder or project on startup
- Prompt to open all modules from last session on startup
- Remember size, position and splitter width for Database Explorer window

 

From what I can see:

You can write Environment Options with: 

Boolean Values:  setYesNoEnvironmentOption(string option, string value)
String Values :  setEnvironmentOption(string option, bool yes)

You can read Environment Options with: 

Boolean Values:  bool getYesNoEnvironmentOption(string option, bool defaultValue)
String Values:   string getEnvironmentOption(string option)

You are looking for the following Environment Options strings: 

const string REMEMBER_LAST_SESSION 
const string REMEMBER_LAST_SESSION_FOLDER_STRING

The third option is not an Environment Option but a Dialog Option. You should be able to manipulate it using the following code: 

You should be able to read it using: 

// const string rememberDBExplorerWindowSettings = (NLS_("rememberDBExplorerWindowSettings"))
bool get(dbExplorerDefaults, rememberDBExplorerWindowSettings, bool default)

You should be able to save it using: 

// const string rememberDBExplorerWindowSettings = (NLS_("rememberDBExplorerWindowSettings"))
set(dbExplorerDefaults, rememberDBExplorerWindowSettings, bool onOff)
saveDefaults(dbExplorerDefaults)

I did not try it - hope it helps, if you have problems - ping back. Regards, Mathias

Re: Customize Toolbar DXL?
EHcnck - Thu Oct 12 07:42:37 EDT 2017

Mathias Mamsch - Thu Oct 12 04:22:16 EDT 2017

From what I can see:

You can write Environment Options with: 

Boolean Values:  setYesNoEnvironmentOption(string option, string value)
String Values :  setEnvironmentOption(string option, bool yes)

You can read Environment Options with: 

Boolean Values:  bool getYesNoEnvironmentOption(string option, bool defaultValue)
String Values:   string getEnvironmentOption(string option)

You are looking for the following Environment Options strings: 

const string REMEMBER_LAST_SESSION 
const string REMEMBER_LAST_SESSION_FOLDER_STRING

The third option is not an Environment Option but a Dialog Option. You should be able to manipulate it using the following code: 

You should be able to read it using: 

// const string rememberDBExplorerWindowSettings = (NLS_("rememberDBExplorerWindowSettings"))
bool get(dbExplorerDefaults, rememberDBExplorerWindowSettings, bool default)

You should be able to save it using: 

// const string rememberDBExplorerWindowSettings = (NLS_("rememberDBExplorerWindowSettings"))
set(dbExplorerDefaults, rememberDBExplorerWindowSettings, bool onOff)
saveDefaults(dbExplorerDefaults)

I did not try it - hope it helps, if you have problems - ping back. Regards, Mathias

this seems to work, does this look correct?

 

setYesNoEnvironmentOption("rememberLastSession", false)
setYesNoEnvironmentOption("rememberLastSessionDisplayedFolder", false)

set(dbExplorerDefaults, rememberDBExplorerWindowSettings, false)
saveDefaults(dbExplorerDefaults)

 

Re: Customize Toolbar DXL?
Mathias Mamsch - Thu Oct 12 07:46:23 EDT 2017

EHcnck - Thu Oct 12 07:42:37 EDT 2017

this seems to work, does this look correct?

 

setYesNoEnvironmentOption("rememberLastSession", false)
setYesNoEnvironmentOption("rememberLastSessionDisplayedFolder", false)

set(dbExplorerDefaults, rememberDBExplorerWindowSettings, false)
saveDefaults(dbExplorerDefaults)

 

Seems fine. You could replace the string constant rememberDBExplorerWindowSettings by a string though. Regards, Mathias

Re: Customize Toolbar DXL?
EHcnck - Thu Oct 12 07:53:25 EDT 2017

Mathias Mamsch - Thu Oct 12 07:46:23 EDT 2017

Seems fine. You could replace the string constant rememberDBExplorerWindowSettings by a string though. Regards, Mathias

Thank you again. IBM support told me that these settings changes via DXL was not possible, their support is going down hill. Thank you.

Re: Customize Toolbar DXL?
EHcnck - Thu Oct 12 11:43:00 EDT 2017

Mathias Mamsch - Thu Oct 12 07:46:23 EDT 2017

Seems fine. You could replace the string constant rememberDBExplorerWindowSettings by a string though. Regards, Mathias

one last question; how can you set the defaults for the modules?

 

setModuleToolbarDefaults ("Edit Mode", true)

 

Re: Customize Toolbar DXL?
Mathias Mamsch - Fri Oct 13 05:26:08 EDT 2017

EHcnck - Thu Oct 12 11:43:00 EDT 2017

one last question; how can you set the defaults for the modules?

 

setModuleToolbarDefaults ("Edit Mode", true)

 

Are you sure there is something like a toolbar default? I only see a "reset to default" but I cannot see a setting to store that. Regards, Mathias